9 Color Special Effects

The AGB provides the following color special effects. The area where these effects are applied can be limited using a window.

1) Blending

Performs arithmetic operations on 2 selected surfaces and implements processing for 16 levels of semi-transparency.

2) Fade-in/Fade-out

Performs arithmetic operations on 1 selected surface and implements processing for 16 levels of brightness.

9.1 Selection of Color Special Effects

The types of color special effects and the target pixels, are determined by the BLDMOD register.

Although color special effects are specified by the BLDMOD register, for blending, which involves processing between surfaces, the 2 target surfaces must have suitable priorities.

In addition, semi-transparent OBJs are individually specified in OAM, and color special effects for the OBJ as a whole, are specified in the BLDMOD register. These specifications are summarized in the following table.

BLDMOD 
Type 
Color Special Effects Processing 
d07 
d06 
No special effects  Normally, color special effects processing is not performed.
16-level semi-transparency processing ( blending) is performed only when a semi-transparent OBJ is present and is followed immediately by a 2nd target screen. 
blending

(Semi-transparency processing) 

If the 1st target screen is followed immediately by a 2nd target screen, 16-level semi-transparency processing ( blending) is performed.
The bits of the backdrop of the 1st target screen should be turned off ([d05]=0).
When OBJ = 1 for the 1st target pixel, processing is executed for all OBJs regardless of the OBJ type.
When OBJ=0, processing is executed only if the OBJ is semi-transparent.  
Brightness Increase  
Gradually increases brightness for 1st target screen.
The entire screen can gradually be made whiter by setting all bits of the specification for the 1st target screen to 1.
When OBJ=1 for the 1st target screen, processing for increased brightness is executed only for normal objects.
If a semi-transparent OBJ is the 1st target screen, blending processing is always executed. 
Brightness Decrease 
Brightness is gradually decreased for the 1st target screen.
The entire screen can gradually be made blacker by setting all bits of the specification for the 1st target screen to 1.
When OBJ=1 for the 1st target screen, processing for decreased brightness is performed only for normal objects. If a semi-transparent OBJ is the 1st target screen, blending processing is always executed. 

9.2 Color Special Effects Processing

Coefficients for Color Special Effects

Coefficients used in blending processing are specified in EVA and EVB of the COLEV register.

The coefficient used in processing brightness changes is specified in EVY of the COLY register.

The values of EVA, EVB, and EVY are numbers less than 1 and are obtained by multiplying 1/16 by an integer.

EVA, EVB, EVY 
Coeff. 
EVA, EVB, EVY 
Coeff. 
8/16 
1/16 
9/16 
2/16 
10/16 
3/16 
11/16 
4/16 
12/16 
5/16 
13/16 
6/16 
14/16 
7/16 
15/16 
 
16/16 

The color special effects arithmetic expressions that use the coefficients are shown below.

1. Blending (16 levels of semi-transparency) Operations

Display color (R) = 1st pixel color (R) ×EVA + 2nd pixel color (R)×EVB
Display color (G) = 1st pixel color (G) ×EVA + 2nd pixel color (G) ×EVB
Display color (B) = 1st pixel color (B) ×EVA + 2nd pixel color (B) ×EVB

2. Brightness Increase Operations

Display color (R) = 1st pixel (R) + (31 - 1st pixel (R) ) ×EVY
Display color (G) = 1st pixel (G) + (63 - 1st pixel (G) ) ×EVY
Display color (B) = 1st pixel (B) + (31 - 1st pixel (B) ) ×EVY

3. Brightness Decrease Operations

Display color (R) = 1st pixel (R) - 1st pixel (R) ×EVY
Display color (G) = 1st pixel (G) - 1st pixel (G) ×EVY
Display color (B) = 1st pixel (B) - 1st pixel (B) ×EVY